package com.byx.chatserver.listener;

import com.byx.imserverutil.ImServerUtilRun;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;

/**
 * ServerCloseListener
 *
 * @author Superb
 * @date 2021/4/4 15:57
 */
public class ServerCloseListener implements ApplicationListener<ContextClosedEvent> {
    @Override
    public void onApplicationEvent(ContextClosedEvent contextClosedEvent) {
        ImServerUtilRun.getInstance().release();
    }
}
